Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jun 1, 2022

Bumps pyright from 1.1.190 to 1.1.251.

Release notes

Sourced from pyright's releases.

Published 1.1.251

Bug Fix: Fixed a bug that results in a false positive when the return type annotation of a function requires code flow analysis to evaluate and a call expression is located on a code path between the function and the declared type referenced by the return type annotation. The fix is to skip "NoReturn" analysis in the code flow engine in this case (and several other similar cases) because it's not necessary. This has the added benefit of improving performance.

Bug Fix: Fixed misleading diagnostic message associated with reportUnnecessaryComparison check when != operator is used in the expression.

Bug Fix: Added logic to better handle the case where a symbol is defined multiple times with a TypeAlias declaration. This is an error condition, but it does occur in some stdlib type stubs if pyright is configured to use "All" for the "pythonPlatform" setting.

Enhancement: Improved type verifier so it can target submodules that are installed using an editable install mechanism.

Performance: Added small performance enhancement for protocol matching. When a protocol mismatch is detected, the remainder of the members are skipped if the caller hasn't requested detailed diagnostic information.

Performance: Added protocol matching optimization for the case where the source type and the destination protocol are both non-generic classes. In this case, we can safely cache the protocol relationship and shortcut future checks.

Bug Fix: Fixed bug in type narrowing logic for expressions of the form "X not in Y".

Bug Fix: Fixed a bug in the isinstance and issubclass type narrowing code paths. They were not handling nested tuples for the second argument.

Enhancement: Extended the "X in Y" type narrowing to support dict, defaultdict and OrderedDict classes.

Bug Fix: Fixed bug that resulted in a false positive error when using == or != operator with type(None).

Bug Fix: Fixed a bug that led to a false negative in some instances when assigning an inappropriate type to a TypedDict key.

Bug Fix: Fixed a bug that led to a false positive when assigning a value to an index expression where the base type of the index was inferred rather than declared.

Bug Fix: Fixed a bug in completion provider that resulted in incomplete member suggestions when a LiteralString type is used.

Bug Fix: Fixed a bug that resulted in a false positive error when evaluating an expression a + b where a is a LiteralString. For purposes of binary expression evaluation, LiteralString should act like a str.

Published 1.1.250

Behavior Change: Removed the assumption that deferred evaluation of annotations is enabled by default in Python 3.11. It looks like this won't be the case.

Bug Fix: Fixed bug that resulted in false negative when using a variable in a type annotation if the type of that variable evaluated to Unknown.

Bug Fix: Fixed bug in code flow engine that caused type narrowing to fail in some cases where a conditional check was nested at least two loops deep.

Enhancement: Enhanced TypedDict support in completion provider to support unions that contain TypedDicts.

Bug Fix: Fixed bug that resulted in false negative when dunder methods are assigned as instance variables rather than class variables.

Bug Fix: Fixed bug that caused __slots__ entries to be treated as instance variables rather than class variables when looking up dundered methods.

Bug Fix: Fixed a bug that led to a false positive error when using a variable or parameter of type type[T] in a class pattern for a case statement.

Bug Fix: Fixed bug that resulted in a false negative when assigning a union that included an Unknown or Any to another type when invariance was enforced (e.g. list[Any | str] was considered assignable to list[int]).

Enhancement: Updated typeshed stubs to the latest version.

Bug Fix: Fixed bug that resulted in incorrect type evaluation for a recursive call to a generic function.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [pyright](https://github.com/Microsoft/pyright/tree/HEAD/packages/pyright) from 1.1.190 to 1.1.251.
- [Release notes](https://github.com/Microsoft/pyright/releases)
- [Commits](https://github.com/Microsoft/pyright/commits/1.1.251/packages/pyright)

---
updated-dependencies:
- dependency-name: pyright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jun 1, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Jun 7, 2022

Superseded by #117.

@dependabot dependabot bot closed this Jun 7, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/pyright-1.1.251 branch June 7, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant